/*
 * Copyright 2016-2018 TVI Go Easy.
 * Created on 2018/1/29 16:31
 */
package com.tvi.cloud.license.client;

import com.tvi.cloud.license.model.Organization;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 通过 Netflix Feign Client 调用 Organization 服务
 *
 * @author mechanic
 */
@ConditionalOnClass
@FeignClient(serviceId = "organization-service")
public interface OrganizationFeignClient {
    @RequestMapping(
            method= RequestMethod.GET,
            value="/v1/organization/{organizationId}",
            consumes="application/json")
    Organization getOrganization(@PathVariable("organizationId") String organizationId);
}
